package cn.rengy.web.framework.wxmp.token.simple;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.rengy.tpa.wxmp.exception.WeChatException;
import cn.rengy.tpa.wxmp.token.AccessToken;
import cn.rengy.web.framework.wxmp.token.TokenService;
@ConditionalOnProperty(name = "spring.cache.type", havingValue = "simple", matchIfMissing = false)
@Service(value="tokenService")
public class SimpleTokenService implements TokenService{
	private static Logger logger = LoggerFactory.getLogger(SimpleTokenService.class);
	
	/**
	 * 获取token
	 * @param wx_account_id
	 * @return
	 * @throws Exception 
	 */
	public String accessToken(AccessToken accessToken) throws WeChatException{
		return null;
	}
	
	public String jsApiTicket(String appid) throws WeChatException{
		return null;
	}
	/**
	 * 当token不可用时删除
	 * @param wx_account_id
	 */
	public void evictJsApiTicket(String appid,String value){}
	/**
	 * 当token不可用时删除
	 * @param wx_account_id
	 */
	public void evictAccessToken(String appid,String value){}

	public String jsApiTicket(AccessToken accessToken) throws WeChatException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String acquire(String appid) throws WeChatException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void evict(String appid, String value) {
		// TODO Auto-generated method stub
		
	}
}
